package com.superf.taobao.entity;

public class CartItem {
	private Book book;// 商品
	private int amount;// 数量

	public CartItem(Book book, int amount) {
		this.book = book;
		this.amount = amount;
	}
	
	

	/**
	 * 获取购物箱的价格
	 * @return
	 */
	public double getSubTotal() {
		return book.getPrice() * amount;
	}



	public Book getBook() {
		return book;
	}



	public void setBook(Book book) {
		this.book = book;
	}



	public int getAmount() {
		return amount;
	}



	public void setAmount(int amount) {
		this.amount = amount;
	}

}
